home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / snip0493.zip / PLAYDEMO.C < prev    next >
C/C++ Source or Header  |  1993-04-05  |  784b  |  38 lines

  1. /*
  2. **  PLAYDEMO.C - demo of background music functions
  3. **
  4. **  public domain by Bob Stout
  5. */
  6.  
  7. #include <stdio.h>
  8. #include "uclock.h"
  9. #include "sound.h"
  10.  
  11. main()
  12. {
  13.       int i;
  14.  
  15.       if (!playb_open(1024))
  16.       {
  17.             puts("\aError opening play buffer");
  18.             return -1;
  19.       }
  20.       playb_note(C3, 8);
  21.       playb_note(REST, 2);
  22.       playb_note(C3, 8);
  23.       playb_note(REST, 2);
  24.       playb_note(E3, 8);
  25.       playb_note(REST, 2);
  26.       playb_note(E3, 8);
  27.       playb_note(REST, 2);
  28.       playb_note(G3, 8);
  29.       playb_note(REST, 2);
  30.       playb_note(G3, 8);
  31.       playb_note(REST, 2);
  32.       playb_note(E3, 18);
  33.       playb_note(REST, 2);
  34.       for (i = 0; i < 500; ++i)
  35.             printf("i = %d\n", i);
  36.       playb_close();
  37. }
  38.